package lk.icta.core.dao;

import lk.icta.core.entity.Schedule;
import lk.icta.user.entity.User;

import java.util.Date;
import java.util.List;

/**
 * @author Duminda Dharmakeerthi
 */
public interface ScheduleDAO {

    /**
     * Adding a schedule
     *
     * @param schedule The schedule to be added
     * @param user     The user requesting to add the schedule
     */
    public void addSchedule(Schedule schedule, User user);

    /**
     * Updating a schedule
     *
     * @param schedule The schedule to be updated
     * @param user     The user requesting to update the schedule
     */
    public void updateSchedule(Schedule schedule, User user);

    /**
     * Return all active Schedule in the system
     *
     * @return all active Schedule
     */
    public List<Schedule> getAllActiveSchedule(Schedule.Status status);

    /**
     * Return all active schedules of the given D.S. Division.
     *
     * @param status
     * @param dsDivisionId
     * @return List of Schedules in the given D.S. Division.
     */
    public List<Schedule> getAllActiveSchedulesByDSDivision(Schedule.Status status, int dsDivisionId);

    /**
     * Return all active schedules in the given G.N. Division.
     *
     * @param status
     * @param gnDivisionId
     * @return List of schedules in the given G.N. Division
     */
    // public List<Schedule> getAllActiveScheduleByGNdivision(Schedule.Status status, int gnDivisionId);

    /**
     * @param id id of the schedule
     * @return Schedule corresponding to the id
     */
    public Schedule getScheduleById(int id);

    public List<Schedule> getScheduleByDate(Date startDate);

    public List<Schedule> getScheduleByLandId(long landId);
}
